From 4ab7370fbbaea52f0b1bbd283fd2899702cbb097 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 14 May 2008 15:18:26 +0000 Subject: [PATCH] initialize format.visited. 2008-05-14 Sven Neumann * babl/babl-format.c (format_new): initialize format.visited. * babl/babl-format.h * babl/babl-fish-path.c: formatting. svn path=/trunk/; revision=311 --- ChangeLog | 7 +++++++ babl/babl-fish-path.c | 11 ++++++----- babl/babl-format.c | 1 + babl/babl-format.h | 12 ++++++------ 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index f7d6b7d..c01b46f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-14 Sven Neumann + + * babl/babl-format.c (format_new): initialize format.visited. + + * babl/babl-format.h + * babl/babl-fish-path.c: formatting. + 2008-04-16 Sven Neumann * babl/babl.h: formatting. diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index e4674f0..ee9fe02 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -152,7 +152,8 @@ get_conversion_path (Babl *current_format, * let's copy it into our new fish */ fish_path->fish_path.cost = path_cost; fish_path->fish.error = path_error; - babl_list_copy (current_path, fish_path->fish_path.conversion_list); + babl_list_copy (current_path, + fish_path->fish_path.conversion_list); } } } @@ -169,7 +170,7 @@ get_conversion_path (Babl *current_format, /* Mark the current format in conversion path as visited */ current_format->format.visited = 1; - /* Iterate through unvisited formats from the current format ...*/ + /* Iterate through unvisited formats from the current format ...*/ for (i = 0; i < babl_list_size (list); i++) { Babl *next_conversion = BABL (list->items[i]); @@ -372,7 +373,7 @@ test_create (void) // FishPath instrumentation -static Babl *fmt_rgba_double = NULL; +static Babl *fmt_rgba_double = NULL; static double *test = NULL; static void *source; static void *destination; @@ -382,8 +383,8 @@ static double *ref_destination_rgba_double; static Babl *fish_rgba_to_source; static Babl *fish_reference; static Babl *fish_destination_to_rgba; -static double reference_cost; -static int init_instrumentation_done = 0; +static double reference_cost; +static int init_instrumentation_done = 0; static void init_path_instrumentation (Babl *fmt_source, diff --git a/babl/babl-format.c b/babl/babl-format.c index 827a079..bc080c6 100644 --- a/babl/babl-format.c +++ b/babl/babl-format.c @@ -103,6 +103,7 @@ format_new (const char *name, } babl->format.loss = -1.0; + babl->format.visited = 0; babl->format.image_template = NULL; return babl; diff --git a/babl/babl-format.h b/babl/babl-format.h index e7b7111..4903e24 100644 --- a/babl/babl-format.h +++ b/babl/babl-format.h @@ -17,7 +17,7 @@ */ #ifndef _BABL_H -#error this file is only to be included by babl.h +#error this file is only to be included by babl.h #endif /****************************************************************/ @@ -42,10 +42,10 @@ BABL_NAMED_CLASS (format); */ Babl *babl_format_id (int id); void babl_format_each (BablEachFunction each_fun, - void *user_data); + void *user_data); Babl * babl_format (const char *name); Babl * babl_format_new (void *first_arg, - ...) BABL_ARG_NULL_TERMINATED; + ...) BABL_ARG_NULL_TERMINATED; typedef struct { @@ -54,8 +54,8 @@ typedef struct int components; BablComponent **component; BablType **type; - void *image_template; /* image template for use with - linear (non-planer) images */ + void *image_template; /* image template for use with + linear (non-planer) images */ BablSampling **sampling; BablModel *model; @@ -63,6 +63,6 @@ typedef struct int planar; double loss; /*< average relative error when converting from and to RGBA double */ - int visited; /* for convenience in code while searching + int visited; /* for convenience in code while searching for conversion paths */ } BablFormat; -- 2.30.2